Skip to content

Localization Routing and SEO Setup#107

Open
OsakaLOOP wants to merge 3 commits intobefore-refractorfrom
feat-localization-routing-228219827929079271
Open

Localization Routing and SEO Setup#107
OsakaLOOP wants to merge 3 commits intobefore-refractorfrom
feat-localization-routing-228219827929079271

Conversation

@OsakaLOOP
Copy link
Copy Markdown
Owner

Implements full localization routing decoupling it from local storage directly. Updates the URL and context simultaneously. During build time, automatically generates index.html copies for each language variant with properly populated SEO tags and schemas. Includes sitemap.xml.


PR created automatically by Jules for task 228219827929079271 started by @OsakaLOOP

- Integrates react-router-dom to handle /:lang routing.
- Decouples i18n context from IDB logic. IDB is only updated via manual language clicks.
- Re-routes root to the user's saved language preference or zh-cn.
- Introduces build-time script to generate localized SEO index.html pages with ld-json and alternate metadata.
- Configures sitemap generation for localized routes.
- Adds empty search engine verification tags.

Co-authored-by: OsakaLOOP <68284076+OsakaLOOP@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

google-labs-jules Bot and others added 2 commits April 16, 2026 03:14
- Extracts latest `changelog.json` version and content.
- Parses `company_data.json` for supported companies list.
- Dynamically iterates all GeoJSON features to construct a Company -> Line -> Station hierarchy.
- Flattens language string sets from `locales/*/translation.json`.
- Injects all combined static content into a hidden `<div id="seo-content">` inside each generated `dist/{lang}/index.html` file before `</body>`.
- Fixes module reference errors for missing react-router hooks in LoginModal and InitialSetupModal components.

Co-authored-by: OsakaLOOP <68284076+OsakaLOOP@users.noreply.github.com>
- Added missing `saveData` callback to `LoginModal.jsx` when explicitly switching languages manually, preventing IDB and backend drift.
- Installed missing `react-helmet-async` dependency into `package.json` to fix fatal "Module not found" build and runtime errors caused by dynamically updating the HTML lang attribute in `<AppLayout>`.

Co-authored-by: OsakaLOOP <68284076+OsakaLOOP@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant